<%@ include file="/common/taglibs.jsp"%>
<probiz:pageHeading entityName="${wrap.wrapName}" entityHeadingKey="wrapDetail.heading" />
<probiz:showBindErrors bindPath="wrap.*" />

<content tag="buttons">
	<probiz:iconBtn btnType="save" onclick="fnDoSave(this, 'wrapName')" />
	<c:if test="${wrap.wrapId!=null}">
		<probiz:iconBtn btnType="delete" onclick="fnDoDelete(this, 'wrapName')" />
	</c:if>
	<probiz:iconBtn btnType="back" url="${ctxPath}/system/wrap.html" />
</content>
<div class="top clearfix">
	<ul class="tab">
		<li class="curr"><span><fmt:message key="wrapDetail.heading"/></span></li>
	</ul>
</div>
<form class="mainForm" method="post" id="wrap" onsubmit="return validateWrap(this)" action="${ctxPath}/system/wrap.html">
	<input type="hidden" name="wrapId"	value="${wrap.wrapId}" />
<div class="modify"> 
<table  width="100%" border="0" cellspacing="0" cellpadding="0" class="com_modi_table">
    <tr>
		<th colspan="2" class="title"><h4><fmt:message key="wrap.group.basic"/></h4></th>
	</tr>
    <tr>
        <th  class="label_width_1">
            <StoreAdmin:label key="wrap.wrapName"/>
        </th>
        <td>
            <input type="text" id="wrapName" name="wrapName" class="inputtxt" style="width:350px;" value="${wrap.wrapName}" />        	
        </td>
    </tr>    
    <tr>
        <th>
            <StoreAdmin:label key="wrap.defaultPrice"/>
        </th>
        <td with="77%">
        	<input type="text" id="defaultPrice" name="defaultPrice" class="inputtxt" style="width:350px;" value="${wrap.defaultPrice}" />
        </td>
    </tr>
    <tr>
        <th>
            <StoreAdmin:label key="wrap.description"/>
        </th>
        <td>
			<textarea class="textareatxt" name="description" id="description"  cols="80" rows="3">${wrap.description}</textarea>
        </td>
    </tr>
   <tr>
		<th colspan="2" class="title"><h4><fmt:message key="wrap.group.image"/></h4></th>
	</tr>
    <tr>
        <th>
            <StoreAdmin:label key="wrap.imageSrc"/>
        </th>
        <td>
				<img id="uploadImage" src="${mediaPath}${wrap.imageSrc}"
					onerror="$j(this).attr('originsrc',this.src);this.onerror='';this.src=__defaultImage_brand"
					originsrc="" height="100" width="100" />
				 <fmt:message key="wrap.image.tip"/>
				<br />
				<input type="hidden" name="imageSrc" id="imageSrc" value="${wrap.imageSrc}">
				<probiz:plugin_upload fileInputId="imageSrc" uploadFileTypes="jpg,gif" onComplete="fnUploadImagehandler"/>
				<script type="text/javascript">
					function fnUploadImagehandler(mediaUrl){
						$j("#uploadImage").get(0).src=__mediaPath+mediaUrl;
					}
				</script>
        </td>
    </tr>
    <tr>
        <th> </th>
        <td></td>
    </tr>
</table>
</div>
</form>
<v:javascript formName="wrap" staticJavascript="false"/>
<script type="text/javascript">
    document.forms["wrap"].elements["wrapName"].focus();
</script>
